package com.tensquare.util;

/**
 * 推特提供的分布式id生成器，资源已提供
 */
public class IdWork {

    private Integer id;
    private Integer work;

    public IdWork(Integer id, Integer work){
        this.id = id;
        this.work = work;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getWork() {
        return work;
    }

    public void setWork(Integer work) {
        this.work = work;
    }

    public String nextId(){
        double random = Math.random() * 10;

        return (random + "").substring(2);
    }



}
